# switch betwwen NSE and SE
#' @export
pro_switch <- function(pro) {
if (pro) {
rlang::sym
} else {
enquo
}
}
#' @export
pro_switch_test_function <- function(vbl, pro = F) {
vbl <- pro_switch(pro)(vbl)
filter(mtcars, UQ(vbl) == 4) %>%
nrow()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.